package ru.spies.pages;

import ru.spies.entities.Role;
import ru.spies.forms.DBFunctionalForm;

public class UpdateUserPage extends AbstractPage{

	private static UpdateUserPage statThis;
	
	private static final String PAGE_NAME="Обновление информации о пользователе";
	
	private static Role userRole;

	private UpdateUserPage() {
		
	}
	
	public static UpdateUserPage getInstance(Role userRole){
		if (statThis==null){
			statThis = new UpdateUserPage();
		}
		setUserRole(userRole);
		return statThis;
	}

	@Override
	public String getThisPage() {
		return getPage(PAGE_NAME, DBFunctionalForm.getInstance().createUpdateUserForm(userRole),getStandartHeadContent());
	}
	
	private static void setUserRole(Role role){
		userRole=role;
	}

}
